import Mock from 'mockjs'

export default {
  getBusinessList: () => {
    const rows = Mock.mock({
      'rows|30': [{
        id: '@increment(1)',
        account:5000,
        freezeNum:3000,
        createTime: '@date("yyyy-MM-dd HH:mm:ss")',
        businessName: '@ctitle(5)',
        'special|1': true,
        title: '@sentence(10, 20)',
        contactTel: '@increment(10000)',
        'type|1': [0, 1, 2],
        businessAddress: '@ctitle(10)',
        totalNum: 25,
        contactTel:'15899999999',
        time: '9:00 - 22:00',
        'devType|1': [0, 1, 2],
        'status|1': [0, 1],
        contactName: '@cname()',
        pageviews: '@integer(300, 5000)'
      }],
      'total': 100
    })    
    return {
      "completeCode": 1,
      "reasonCode": "000000",
      "reasonMessage": "成功",
      "data": rows
    }
  },
  editShop: () => {    
    return {
      "completeCode": 1,
      "reasonCode": "000000",
      "reasonMessage": "成功",
      "data": null
    }
  },
  getStoreList: () => {
    const rows = Mock.mock({
      'rows|30': [{
        id: '@increment(1)',
        createTime: '@date("yyyy-MM-dd HH:mm:ss")',
        updateTime: '@date("yyyy-MM-dd HH:mm:ss")',
        shopName: '@ctitle(5)',
        brandName:'@ctitle(5)',
        seriesName:'@ctitle(5)',
        specName:'@ctitle(5)',
        vin:'98765432198765432',
        carDesc: '@ctitle(100)',
        carImages: ['https://photo.16pic.com/00/66/89/16pic_6689246_b.jpg','https://photo.16pic.com/00/66/89/16pic_6689246_b.jpg','https://photo.16pic.com/00/66/89/16pic_6689246_b.jpg'],
        'flag|1': [0, 1],
      }],
      'total': 100
    })    
    return {
      "completeCode": 1,
      "reasonCode": "000000",
      "reasonMessage": "成功",
      "data": rows
    }
  },
}
